package com.exp.service;

import com.exp.dao.UserOrderMapper;
import com.exp.dao.more.MoreUserOrderMapper;
import com.exp.model.UserOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 Created by guojianyu on 2016/3/31.
 */
@Service
@Transactional
public class UserOrderService {
 @Autowired
 private MoreUserOrderMapper moreUserOrderMapper;
 @Autowired
 private UserOrderMapper userOrderMapper;
 /*管理员消费者所有订单信息*/
 public List<UserOrder> UserOrderListAll(Map map) {
  return moreUserOrderMapper.getUserOrderListAll(map);
 }
  /*商家查看消费者订单*/
  public List<UserOrder> UserOrderList(Map map) {
   return moreUserOrderMapper.getUserOrderList(map);
  }
  /*保存购买热销餐品-top-最近上新信息*/
  public int saveAll(UserOrder userOrder){
   return  userOrderMapper.insert(userOrder);
  }
}
